<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title></title>
</head>
<body>
<div class="contant">
<div class="row">
    <div class="top">资产部>电催任务</div>
    <div class="content applylist">
        <div class="box">
            <h1>电催任务列表</h1>
            <div class="list-block">
                <div class="row">
                    <!-- <a href="{:U('Bankrule/add')}"><button class="addcus"><span></span>添加规则</button></a> -->
                </div>
                <div class="row">
                    <table class="list">
                        <tr>
                            <th>姓名</th> <th>身份证</th> <th>银行卡号</th> <th>逾期月份</th> <th>逾期金额</th><th>状态</th><th>操作</th>
                        </tr>
                        <volist name="list" id="_overdue">
                            <tr>
                                <td>{$_overdue.id}</td>
                                <td>{$_overdue.indenty_no}</td>
                                <td>{$_overdue.bank_card}</td>
                                <td>{$_overdue.overdue_month}</td>
                                <td>{$_overdue.overdue_money}</td>
                                <td>
                                    <switch name="_overdue.task_status" >
                                        <case value="0"> 未催回</case>
                                        <case value="1"> 已催回</case>
                                        <case value="2"> 已代偿</case>
                                    </switch>
                                </td>
                                <td>
                                    <a href="{:U('Task/feedback?overdue_id='.$_overdue['id'])}">填写反馈</a>
                                    <a class="" href="{:U('Apply/detail_info?user_id='.$_overdue['user_id'])}">查看资料</a>
                                </td>
                            </tr>
                        </volist>
                    </table>
                </div>
                {$page}
            </div>
        </div>
    </div>
</div>
</div>
<script type="text/javascript">
    // 传递overdue-id
    $('.point-task').click(function(){
        var overdueId = $(this).attr('data-id');
        $('#overdue-id').val(overdueId);
    });

    // 提交反馈信息
    $('#sub-feedback').click(function(){
        var overdueId   = $('#overdue-id').val();
        var executeType = $('#execute-type').val();
        var feedback    = $('#feedback').val();

        $.ajax({
           type: "POST",
           url: "__URL__/telbak",
           data: {
                overdue_id:overdueId,
                execute_type:executeType,
                feedback:feedback
            },
           success: function(msg){
                console.log(msg);
                if (msg > 1) {
                    alert('添加反馈成功');
                    window.location.reload()
                    return false;
                }else{
                    msg = $.parseJSON(msg);
                    alert(msg.message);
                }
           }
        });

        $(this).attr('data-dismiss','modal');
    });
</script>
</body>
</html>